package org.flint92.springboot.jpa.listener;

import javax.persistence.*;

/**
 * @author flint92
 */
public class UserListener {

    @PrePersist
    public void prePersist(Object source) {
        System.out.println("pre persist" + source);
    }

    @PostPersist
    public void postPersist(Object source) {
        System.out.println("post persist" + source);
    }

    @PreUpdate
    public void preUpdate(Object source) {
        System.out.println("pre update" + source);
    }

    @PostUpdate
    public void postUpdate(Object source) {
        System.out.println("post update" + source);
    }

    @PreRemove
    public void preRemove(Object source) {
        System.out.println("pre remove" + source);
    }

    @PostRemove
    public void postRemove(Object source) {
        System.out.println("post remove" + source);
    }

    @PostLoad
    public void postLoad(Object source) {
        System.out.println("post load");
    }
}
